<aside id="sidebar">
     <!--分类-->
  <div class="widget-wrap">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list">

          {% for cate_post in cate_posts %}
            <li class="category-list-item">
              <a class="category-list-link" href="/category/{{ cate_post.category }}">{{ cate_post.category__cname }}</a>
              <span class="category-list-count">{{ cate_post.count }}</span>
            </li>
          {% endfor %}

      </ul>
      </div>
  </div>

     <!--归档-->
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list">
            {% for ap in arc_posts %}
            <li class="archive-list-item">
                <a class="archive-list-link" href="/archive/{{ ap.0|date:'Y' }}/{{ ap.0|date:'m' }}">{{ ap.0|date:'Y年m月' }} </a>
                <span class="archive-list-count">{{ ap.1 }}</span>
            </li>
          {% endfor %}
      </ul>
    </div>
  </div>

  <div class="widget-wrap">
    <h3 class="widget-title">近期文章</h3>
    <div class="widget">
      <ul>
            {% for rp in recent_posts %}
                <li>
                    <a href="/post/{{ rp.id }}" target="_blank">{{ rp.title }}</a>
                </li>
            {% endfor %}
      </ul>
    </div>
  </div>
  <div class="widget-wrap">
    <h3 class="widget-title">友情链接</h3>
    <div class="widget">
      <ul>
          <li>
            <a href="http://www.bjsxt.com/" target="_blank">尚学堂</a>
          </li>
          <li>
            <a href="http://www.sxt.cn/" target="_blank">速学堂</a>
          </li>
      </ul>
    </div>
  </div>
</aside>